<?php
class User {
	var $iID;
	var $sUser;
	var $sFullname;
	var $sEmail;
	var $bAdmin;
	var $bAccountant;
	var $iLastlogon;
	var $sJobAccess;
	var $oTimes;
	var $iUsergroups;
	
	function User($iID, $sUser, $sFullname, $sEmail, $bAdmin, $bAccountant, $iLastlogon = 0) {
		$this->iID = $iID;
		$this->sUser = $sUser;
		$this->sFullname = $sFullname;
		$this->sEmail = $sEmail;
		$this->bAdmin = $bAdmin;
		$this->bAccountant = $bAccountant;
		$this->iLastlogon = $iLastlogon;
	}
	
	/* To kill? 2011-12-26
	function getCommonJobAccess() {
		if (!is_array($this->sJobAccess)) {
			$this->sJobAccess = UserHandler::getCommonJobAccess($this->iID);
		}

		return $this->sJobAccess;
	}
	*/
	
	function getTimes($iMonth = 0, $iYear = 0) {
		if (!is_array($this->oTimes)) {
			$this->oTimes = UserHandler::getTimes($this->iID, $iMonth, $iYear);
		}

		return $this->oTimes;
	}
	
	function getUsergroups($bForce = false) {
		return UserHandler::getUsergroups($this->iID, $bForce);
	}
}
?>
